<!--
<ion-view title="">
  <ion-content has-header="true" padding="true">
      <ion-list>
          <ion-item class="item item-icon-right" ng-repeat="item in items" type="item-text-wrap" href="#/tab/item/{{item.id}}">
              <i class=""></i>
              <p>{{item.name}}</p>

              <label class="toggle toggle-positive">
                  <input type="checkbox" checked>
                  <div class="track">
                      <div class="handle"></div>
                  </div>
              </label>


              <i class="icon icon-right ion-chevron-right"></i>


          </ion-item>
      </ion-list>
  </ion-content>
</ion-view>
-->

<ion-view title="设备：{{itemName}}">
    <!--<ion-nav-bar class="bar-stable nav-title-slide-ios7  bar-positive">
        <ion-nav-back-button class="button-icon icon  ion-ios7-arrow-back">
            返回
        </ion-nav-back-button>
    </ion-nav-bar>-->
    <ion-nav-bar class="bar-stable nav-title-slide-ios7  bar-positive">
        <ion-nav-back-button class="button-icon ion-nav-back-button " style="font-weight: 700;font-size: 14px;width: 70px;background-image: url('./img/back.png');background-size: 70px 32px;background-repeat:no-repeat;">
            &nbsp;&nbsp;&nbsp;返回
        </ion-nav-back-button>
    </ion-nav-bar>
    <ion-content has-header="true"  has-bouncing="true" overflow-scroll="false" style="background-color: #E9F3FC;">
        <!--{{item.name}}-->
        <ion-list>
            <ion-item class="item" ng-repeat="device in deviceList" type="item-text-wrap" href="#/tab/relay/{{device.did}}/{{device.deviceName}}">
                <!-- <i class=""></i>
                 <p>{{item.name}}</p>
                 <label class="toggle toggle-positive">
                     <input type="checkbox" checked>
                     <div class="track">
                         <div class="handle"></div>
                     </div>
                 </label>

                 <i class="icon icon-right ion-chevron-right"></i>
                 <label class="checkbox">
                     <input type="checkbox" checked>
                 </label>-->

                <div class="row">
                    <div class="col col-top col-10" style=" margin-top: -15px;margin-left: -1px; padding: 0px;">
                        <div ng-if="device.isOnline==1">
                            <img src="./img/bulb1.png" style="width: 15px;height: 28px;">
                            <!--<a class="button button-icon"></a>--><!--ion-ios7-lightbulb-outline--><!-- icon ion-ios7-lightbulb-->
                        </div>
                        <div ng-if="device.isOnline==0">
                            <img src="./img/bulb2.png" style="width: 15px;height: 28px;">
                            <!--<a class="button button-icon"></a>--><!--ion-ios7-lightbulb-outline--><!-- icon ion-ios7-lightbulb-->
                        </div>
                    </div>
                    <div class="col col-top">
                        <div style="margin-top: -10px;">&nbsp;&nbsp;<a href="#/tab/device/{{device.did}}/{{device.deviceName}}" style="text-decoration: none; color: #4C86B4;font-weight: 700;font-size: 18px; ">{{device.deviceName}}</a></div>
                    </div>

                    <!--<div class="col col-top" style=" margin-top: -15px;padding: 0px;">
                        <div>
                            <a class="button button-icon icon ion-merge" ></a>
                        </div>
                    </div>-->
                </div>
                <div class="row" style="height: 30px;">
                    <div class="col col-top col-10">
                        <div><label class="checkbox" style="margin-left: -10px; margin-top: -10px; padding-left: 0px;">
                            <input type="checkbox"  ng-model="device.selected"  ng-true-value="0"
                                   ng-false-value="1" ng-click="fn(device.did)">
                        </label></div>
                    </div>
                    <div class="col col-top col-25" style=" margin-top: -5px;">
                        <label class="toggle toggle-positive">
                            <input type="checkbox"  name="checkToggle" ng-model="device.deviceState" ng-true-value="1" ng-false-value="0" ng-change="changeState(device.did,device.deviceState)">
                            <div class="track">
                                <div class="handle"></div>
                            </div>
                        </label>
                    </div>
                    <div class="col col-top" style=" margin-top: -7px;padding: 0px;">
                        <div>
                            <a class="button button-icon" href="#/tab/scheme/{{device.did}}/{{device.deviceName}}/{{device.mode}}">
                                <img src="./img/timer.png" style="padding-top: 12px;vertical-align:text-bottom;">
                                <span style="font-size: 12px; color: #404445">&nbsp;&nbsp;{{device.timerProgram}}</span>
                            </a>
                            <!-- class="button button-icon icon ion-ios7-stopwatch"-->
                        </div>
                    </div>
                    <div class="col col-top col-offset-66" style=" margin-top: -15px; padding: 0px;"><!--margin-left: 190px;-->
                        <div style="font-size: 18px;margin-left: 18px;color:#4C86B4 ">
                            <i class="icon icon-right ion-chevron-right"></i>
                        </div>
                    </div>
                </div>

            </ion-item>
            <div class="row" style="margin-left: 0px;" ng-if="isCheckAll.isdata==1">
                <div class="col col-10">
                    <label class="checkbox">
                        <input type="checkbox" ng-mudel="name" name="checksName" ng-click="checkAll()">
                    </label>
                </div>
                <div class="col col-33 col-center" style="font-weight: bold; margin-top: 9px;">
                    &nbsp;&nbsp;全选
                </div>
                <div class="col col-33 col-center col-offset-34" style="margin-top: 5px">&nbsp;&nbsp;
                    <label class="toggle toggle-positive">
                        <input type="checkbox" name="checkToggle" ng-model="isCheckAll.ckall" ng-true-value="1" ng-false-value="0" ng-change="changeStateSelect(isCheckAll.ckall)">
                        <div class="track">
                            <div class="handle"></div>
                        </div>
                    </label>
                    <!--<label class="toggle toggle-positive">
                        <input type="checkbox" name="checkToggle" ng-model="isCheckAll.ckall" ng-true-value="1" ng-false-value="0" ng-change="changeStateSelect(isCheckAll.ckall)">
                        <div class="track">
                            <div class="handle"></div>
                        </div>
                    </label>-->
                </div>
            </div>
        </ion-list>
        <!--<ion-list>
            <ion-item class="item" style="padding: 0px;">
                <div class="row" style="margin-left: -5px;">
                    <div class="col col-10">
                        <label class="checkbox">
                        <input type="checkbox" ng-mudel="name" name="checksName" ng-click="checkAll()">
                    </label>
                    </div>
                    <div class="col col-33 col-center" style=" margin-top: 9px;">
                        &nbsp;&nbsp;全选
                    </div>
                    <div class="col col-33 col-center col-offset-34">&nbsp;&nbsp;
                        <label class="toggle toggle-positive">
                            <input type="checkbox" checked>
                            <div class="track">
                                <div class="handle"></div>
                            </div>
                        </label>
                    </div>
                </div>

            </ion-item>

        </ion-list>-->

    </ion-content>
</ion-view>
